$(document).ready(function () {
    //弹出加载
    var index = layer.load(1);
    //获取系统消息
    $.ajax({
        url: $.cookie("tempUrl") + "sysdoctornews/find01List?doctorId=" + $.cookie("doctorId") + "&pageNum=1&pageSize=10",
        // url: $.cookie("tempUrl") + "sysdoctornews/find01List?doctorId=159&pageNum=1&pageSize=12",
        type: "POST",
        success: function (result) {
            if (result.code === 200 && result.data.dataList.length !== 0) {
                $(result.data.dataList).each(function (index, element) {
                    console.log(element.memberName)
                    $(".content").before('\n' +
                        '\t\t\t\t\t<tr>\n' +
                        '\t\t\t\t\t\t<td>' + element.title + '</td>\n' +
                        '\t\t\t\t\t\t<td>' + element.createTime + '</td>\n' +
                        '\t\t\t\t\t\t<td>' + element.message + '</td>\n' +
                        '\t\t\t\t\t</tr>')
                });
            } else {
                $(".content").html("")
                layer.msg("暂无新消息")
            }
        }, error() {
            $(".content").html("")
            layer.msg("暂无新消息")
        }
        ,
        complete() {
            layer.close(index)
        }
    });
})
;

function onBack() {
    parent.$("#health").show();
    parent.$("#frame").hide();
    parent.isHealth = false;
}

function onCheckClick() {
    parent.parent.layer.open({
        type: 2,
        title: false,
        area: ['700px', '500px'],
        closeBtn: 0,
        shadeClose: false,
        content: 'msg_content_dialog.html',
        success: function (layero, index) {
            var body = parent.parent.layer.getChildFrame('body', index);
            //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
            var iframeWin = parent.parent.window[layero.find('iframe')[0]['name']];
            // iframeWin.setSingleButton();
            // iframeWin.setMessage("当前暂无医技项目，无法保存");
            // iframeWin.setConfirm("确定", function() {});
        }
    });
}